home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Clinical Endocrinology
/
Clinical Endocrinology.iso
/
mac
/
00000000
/
26000000
/
26040000
/
Shared.dir
/
00954_Script_954
< prev
next >
Wrap
Text File
|
1995-11-17
|
2KB
|
81 lines
-- Handler to set up global to contain a string which
-- is the first bit of the moviePath
on setDisk
global hardDisk, menuSwitch
put the pathname into checkThisPath
put offset("00000000", checkThisPath) into endOfString
put char 1 to endOfString + 8 of checkThisPath into hardDisk
set menuSwitch = "off"
end setDisk
---------------------------------------------------------
-- Handler to determine which platform the CD is running on
-- and specifying which separator, i.e. ":" or "/" to use.
-- The correct separator is stored as a global, "gSep" - short
-- for global separator.
on whereAmI
global gSep
if the machineType <> 256 then
set gSep = ":"
else
set gSep = "\"
end if
end whereAmI
---------------------------------------------------------------
-- Handler triggered from handler "menuDrop" when a menu item
-- is clicked on. The variable "itemNumber refers to the place
-- in the menu the item resides. The number corresponds to a
-- pre-defined list in text cast member "Menu Links"
-- which is a line by line list of links to other movies.
-- N.B. The 1st line is always "The Endocrine System" not the
-- screen title.
on menuItem itemNumber
global HardDisk, gSep, pathToMovie
put line itemNumber of field "Menu Links" into menuLinkString
stripMoviePath menuLinkString
keepHistory
go movie hardDisk & pathToMovie
end menuItem
---------------------------------------------------------------
-- Handler to strip a line of text with words separated by spaces
-- and make a new line of text which is a pathname with platform
-- specific separators.
on stripMoviePath textToStrip
global gSep, pathToMovie
if voidP(gSep) = true then put ":" into gSep
put the number of words in textToStrip into theWordCount
set pathToMovie = ""
repeat with i = 1 to theWordCount
put word i of textToStrip after pathToMovie
if i = theWordCount then exit repeat
put gSep after pathToMovie
end repeat
put pathToMovie
end stripMoviePath
------------------------------------------------